import request from "../utils/request"
import qs from "querystring"

export const listOrderByPage = (query)=>{
    return request.get("/order",{
        params:query,
        paramsSerializer:(param)=>{
            return qs.stringify(param);
        }
    })
}

export const listOrderItem = (orderId)=>{
    return request.get("/item/by/order?orderId="+orderId)}

export const findOrderByCondition = (query)=>{
        return request.get("/order/by/condition",{
            params:query,
            paramsSerializer:(params)=>{
                return qs.stringify(params);
            }
        })
    }

    export const saveOrUpdateOrder = (param) => {
        return request.post("/order",param);
    }